package loader;
import java.net.*;

import org.apache.log4j.Appender;
import org.apache.log4j.BasicConfigurator;
import org.apache.log4j.ConsoleAppender;
import org.apache.log4j.Logger;
import org.apache.log4j.PatternLayout;

import lock.Loock;

import split.panel.SpliWindow;
//import java.io.*;

public class Hello
{

	/**
	 * @param args
	 * @throws MalformedURLException 
	 * @throws URISyntaxException 
	 */
	public static void main(String[] args) throws Exception
	{
		BasicConfigurator.configure(new ConsoleAppender(new PatternLayout("[%d{ISO8601}] %-5p (%F:%L) %m %n")));
//		BasicConfigurator.configure(new ConsoleAppender(new PatternLayout("[%d{ISO8601}] %-5p (%F:%L) %m %n"), "System.err"));
//		BasicConfigurator.configure(new ConsoleAppender(new PatternLayout("[%d{ISO8601}] %-5p (%F:%L) %m %n", System.err)));
//		BasicConfigurator.configure();
//		Logger.getRootLogger()
//		Logger. Logger.getRootLogger();
//		System.out.println("sad");
//		SpliWindow sWindow = new split.panel.SpliWindow();
//		System.out.println("Ala ma kota");
		new Loock().main();
		// TODO Auto-generated method stub
		/*URL myURL = new URL("http://www.bwa.netgaleria.pl/strona/");
		URI myURI = myURL.toURI();
		
        System.out.println("protocol = " + myURL.getProtocol());
        System.out.println("authority = " + myURL.getAuthority());
        System.out.println("host = " + myURL.getHost());
        System.out.println("port = " + myURL.getPort());
        System.out.println("path = " + myURL.getPath());
        System.out.println("query = " + myURL.getQuery());
        System.out.println("filename = " + myURL.getFile());
        System.out.println("ref = " + myURL.getRef());*/
        
        //==== Reading Directly =====
        /*BufferedReader in = new BufferedReader(new InputStreamReader(myURL.openStream()));

        String inputLine;
        while ((inputLine = in.readLine()) != null)
            System.out.println(inputLine);
        in.close();*/
        //===========================
        //http://docs.oracle.com/javase/tutorial/networking/urls/readingWriting.html
//        URLConnection yc = myURL.openConnection();
		
		Logger.getRootLogger().info("EXIT");
	}

}
